<template>
  <div>
    <el-form :inline="true" class="demo-form-inline" :model="cForm">
      <el-form-item label="一级分类">
        <el-select
          placeholder="请选择"
          @change=""
          v-model="cForm.category1Id"
        >
          <el-option
            :label="c1.remark"
            :value="c1.id"
            v-for="(c1, index) in list1"
            :key="c1.id"
          ></el-option>
        </el-select>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
export default {
  name: "Category",
  data() {
    return {
      cForm: {
        category1Id: "",
        category2Id: "",
        category3Id: "",
      },
      list1: [],
    };
  },
  mounted() {
    this.handler1();
  },
  methods: {
    async handler1() {
      let result = await this.$API.user.reqfindRoomTypeAll();
      console.log(result.data);
      this.list1 = result.data;
    },
  },
};
</script>
<style scoped>
</style>